package com.sise.wangzhan.client;

import com.sise.wangzhan.entity.Person;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @Classname PersonClient
 * @Description TODO    采用第三方的注解方式
 * @Date 2020/4/16 11:50
 * @Created by wangzhan
 */

//@FeignClient(name = "lab06-eureka-feign-provider")  //声明调用的服务名称
public interface PersonClient {

    @RequestMapping(value = "/hello", method = RequestMethod.GET)
    String hello();

    @RequestMapping(value = "/person/{p_id}",method = RequestMethod.GET)
    Person getPerson(@PathVariable("p_id") Integer p_id);

}
